home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Aztec C v5.2a disk 4.adf / 204inc_h.lzh / devices / gameport.h < prev    next >
C/C++ Source or Header  |  1991-03-14  |  1KB  |  58 lines

  1. #ifndef DEVICES_GAMEPORT_H
  2. #define DEVICES_GAMEPORT_H
  3. /*
  4. **    $Filename: devices/gameport.h $
  5. **    $Release: 2.04 $
  6. **    $Revision: 36.1 $
  7. **    $Date: 90/11/05 $
  8. **
  9. **    GamePort device command definitions
  10. **
  11. **    (C) Copyright 1985,1986,1987,1988,1989 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. */
  14.  
  15. #ifndef    EXEC_TYPES_H
  16. #include    "exec/types.h"
  17. #endif
  18.  
  19. #ifndef    EXEC_IO_H
  20. #include    "exec/io.h"
  21. #endif
  22.  
  23. /******     GamePort commands ******/
  24. #define     GPD_READEVENT       (CMD_NONSTD+0)
  25. #define     GPD_ASKCTYPE       (CMD_NONSTD+1)
  26. #define     GPD_SETCTYPE       (CMD_NONSTD+2)
  27. #define     GPD_ASKTRIGGER       (CMD_NONSTD+3)
  28. #define     GPD_SETTRIGGER       (CMD_NONSTD+4)
  29.  
  30. /******     GamePort structures ******/
  31.  
  32. /* gpt_Keys */
  33. #define     GPTB_DOWNKEYS       0
  34. #define     GPTF_DOWNKEYS       (1<<0)
  35. #define     GPTB_UPKEYS       1
  36. #define     GPTF_UPKEYS       (1<<1)
  37.  
  38. struct GamePortTrigger {
  39.    UWORD gpt_Keys;       /* key transition triggers */
  40.    UWORD gpt_Timeout;       /* time trigger (vertical blank units) */
  41.    UWORD gpt_XDelta;       /* X distance trigger */
  42.    UWORD gpt_YDelta;       /* Y distance trigger */
  43. };
  44.  
  45. /****** Controller Types ******/
  46. #define     GPCT_ALLOCATED       -1     /* allocated by another user */
  47. #define     GPCT_NOCONTROLLER 0
  48.  
  49. #define     GPCT_MOUSE       1
  50. #define     GPCT_RELJOYSTICK  2
  51. #define     GPCT_ABSJOYSTICK  3
  52.  
  53.  
  54. /****** Errors ******/
  55. #define     GPDERR_SETCTYPE   1     /* this controller not valid at this time */
  56.  
  57. #endif    /* DEVICES_GAMEPORT_H */
  58.